In image forming apparatuses, such as a Multi Function Peripheral (MFP), images of a manuscript read by using a scanner function can be printed, or transmitted via FAX. Here, at the time of reading a manuscript, there may be a case where whether the manuscript is a color manuscript or a monochrome manuscript cannot be judged until the read-in of images corresponding in amount to one page has been completed. Further, there may be a case where whether to output the read-in images in a color mode or a monochrome mode is set later on.
Therefore, according to one of currently-used methods, at the time of reading of a manuscript, both a color image and a monochrome image are stored in a memory, and thereafter, at a time point when whether to process the read image as a color image or a monochrome image is determined, the unnecessary image is eliminated from the memory. However, in this method, the memory is required to have a sufficient amount of usable memory space. Accordingly, there is a problem that memory resources cannot be utilized effectively.
With regard to such a problem, for example, Japanese Unexamined Patent Publication (JP-A) No. 2007-28408 discloses an image processing apparatus which includes an image input section, a color image producing section, a monochrome image producing section, a synthesizing section, a buffer section, a judging section, and an output control section. In the image processing apparatus, the above sections are configured to act as follows. The image input section inputs image data of a manuscript image. The color image producing section produces color image data by performing color image processing for the image data of the manuscript image. On the other hand, the monochrome image producing section produces monochrome image data with a bit size per one pixel smaller than that of the color image data by performing monochrome image processing for the image data of the manuscript image. The synthesizing section produces synthesized-image data with a bit size per one pixel equal to that of the color image data by synthesizing the monochrome image data with the color image data. The buffer section stores temporarily image data. The judging section judges whether the manuscript image is a color image or a monochrome image based on the image data of the manuscript image. The output control section controls image output processing for an external section in response to a designated mode. When the designated mode is an automatic color selection mode, the output control section makes the buffer section store the image data output from the synthesizing section. Further, when the judging section judges that the manuscript image is a color image, the output control section takes out the image data from the buffer section and outputs the image data. Meanwhile, when the judging section judges that the manuscript image is a monochrome image, the output control section extracts the monochrome image data from the image data taken out from the buffer section and outputs the monochrome image data.
In JP-A No. 2007-28408, at the time of image processing, two frames of a color frame and a monochrome frame are produced and the least significant bit of the color difference component of the color frame is replaced with a bit corresponding to a monochrome binary image. Subsequently, when the finally-used image is a color image, the synthesized image is outputted as it is. In the case of a monochrome frame, the least significant bit of each pixel of the synthesized image is outputted. However, this technique deals with only monochrome binary images. Accordingly, in multi-leveled monochrome images, since the number of embedded bits becomes large, this technique is hardly utilized.
Further, according to a conceivable method, in order to save memory resource, only a color image has been acquired, and subsequently, when the manuscript image is judged as a monochrome image, a monochrome image is produced from the color image. With this method, in order to save memory resource, the color image is required to be compressed so as to be stored as a compressed color image. In the case where the compressed color image is stored, a monochrome image is produced through a process of performing monochrome conversion for the compressed color image. However, the produced monochrome image is inferior in image quality as compared with a monochrome image produced from an original image.
For example, in the generally-used image compressing system, an image is divided into the specific number of blocks, representative colors are extracted for each block, and the color of each pixel in each block is replaced with one of the representative colors. In the case of performing such the representative-color-based compression, when a color which becomes a different color in a color image, but is converted into the same color in a gray scale, the number of representative colors in a gray mode decreases as a result, which causes image quality deterioration. The present invention seeks to solve the problem.